package model

import "github.com/jinzhu/gorm"

type Video struct {
	gorm.Model
	Title string `gorm:"type:varchar(50);not null"`
	CoverName string `gorm:"size:255;not null"`
	VideoName string `gorm:"size:255;not null"`
	VideoType string `gorm:"type:varchar(10)"`
	Content string `gorm:"size:255;default:'什么都没有'"`
	Uid uint `gorm:"not null"`
	Author User `gorm:"ForeignKey:id;AssociationForeignKey:uid"`
	//收藏和点赞
	Favorites int `gorm:"default:0"`
	LikeCount int `gorm:"default:0"`
	IsShow bool `gorm:"default:true"`
}

